Skip to content

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Jan 29, 2022

Since cls is POP-ed, error doesn't decref it since it decrefs from TOS down.

https://bugs.python.org/issue46329

@Fidget-Spinner
Copy link
Member Author

@pablogsal This fixes a refleak in GH-30855. Hopefully that means the refleak buildbots will now be green.

Before:

python -m test test_types -R 3:3 -m '*UnionTests.test_or_type_operator_with_genericalias'
0:00:00 Run tests sequentially
0:00:00 [1/1] test_types
beginning 6 repetitions
123456
......
test_types leaked [47, 47, 47] references, sum=141
test_types leaked [22, 22, 22] memory blocks, sum=66
test_types failed (reference leak)

After:

0:00:00 [1/1] test_types
beginning 6 repetitions
123456
......
== Tests result: SUCCESS ==

@markshannon
Copy link
Member

LGTM.
@pablogsal @ambv could you merge this, please?

@pablogsal pablogsal merged commit 8fb3649 into python:main Jan 29, 2022
@Fidget-Spinner Fidget-Spinner deleted the fix_isinstance_refleak branch January 29, 2022 14:38
pablogsal added a commit that referenced this pull request Jan 29, 2022
ambv pushed a commit that referenced this pull request Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants